package com.atguigu.tingshu.model.order;

import com.atguigu.tingshu.model.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serial;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 *     订单信息
 * </p>
 * @author sun
 */
@EqualsAndHashCode(callSuper = true)
@Data
@TableName("order_info")
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class OrderInfo extends BaseEntity {

	@Serial
	private static final long serialVersionUID = 1L;
	/**
	 * 用户ID
	 */

	@TableField("user_id")
	private Long userId;
	/**
	 * 订单标题
	 */

	@TableField("order_title")
	private String orderTitle;
	/**
	 * 订单号
	 */
	@TableField("order_no")
	private String orderNo;
	/**
	 * 订单状态：0901-未支付 0902-已支付 0903-已取消
	 */

	@TableField("order_status")
	private String orderStatus;
	/**
	 * 订单原始金额
	 */

	@TableField("original_amount")
	private BigDecimal originalAmount;
	/**
	 * 减免总金额
	 */

	@TableField("derate_amount")
	private BigDecimal derateAmount;
	/**
	 * 订单总价
	 */
	@TableField("order_amount")
	private BigDecimal orderAmount;
	/**
	 * 付款项目类型: 1001-专辑 1002-声音 1003-vip会员
	 */
	@TableField("item_type")
	private String itemType;
	/**
	 * 支付方式：1101-微信 1102-支付宝 1103-账户余额
	 */
	@TableField("pay_way")
	private String payWay;

	/**
	 * 订单明细列表
	 */
	@TableField(exist = false)
	private List<OrderDetail> orderDetailList;
	/**
	 * 减免明细列表
	 */
	@TableField(exist = false)
	private List<OrderDerate> orderDerateList;
	/**
	 * 订单状态名称
	 */
	@TableField(exist = false)
	private String orderStatusName;
	/**
	 * 支付方式名称
	 */
	@TableField(exist = false)
	private String payWayName;

}